<html>
	<head>
		<meta http-equiv="content-type" content="text/html; charset=utf-8"> 
		<title>{% block title %}{% endblock %}</title>
        <link href="/static/bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen">
     <link href="/static/footer.css" rel="stylesheet">
    <link href="/static/bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet">
        <script src="/static/bootstrap/js/bootstrap.min.js"></script>
		<script src="/static/jquery.js" type="text/javascript"></script> 
	</head>
	<body>
		<table align=center width=100%>
			<tr>
				<td width=20% ><a href=/contest/{{contest.id}} >PROBLEMS</a></td>
				<td width=20% ><a href=/contest/{{contest.id}}/ranklist >RANKLIST</a></td>
				<td width=20% ><a href=/contest/{{contest.id}}/status >SUBMITIONS</a></td>
			</tr>
		</table>
		{% block login %}
		{% if contestlogin %}
		{% if needpassword %}
		<form method=post action=passwd/ align=center>
			<input name=password type=password />
			<input type=submit />
		</form>
		{% else %}
		{% block middle %}
		{% endblock %}
		{% endif %}
		{% else %}
		{% ifequal contest.isPublic 2 %}
		<form method=post action="contestlogin/" align=center>
			username:<input type=username><br>
			password:<input type=password><br>
			<input type=submit>
			<input type=reset>
		</form>
		{% else %}
		<form method=post action="login/" align=center>
			username:<input type=username><br>
			password:<input type=password><br>
			<input type=submit>
			<input type=reset>
		</form>
		{% endifequal %}
		{% endif %}
		{% endblock %}


	</body>


</html>
